#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 5;
int n, r[maxn];
int main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%d", &r[i]);
    }
    sort(r + 1, r + n + 1);
    int cnt = 1;
    for (int i = 2; i <= n; i++) {
        if (r[i] > r[cnt]) {
            cnt++;
        }
    }
    printf("%d\n", n - cnt + 1);
    return 0;
}